<!DOCTYPE html>
<html>
<head>
    <meta charset="UTF-8">
    <title>Document</title>
    <style>
        
    </style>
</head>
<body>
</body>
<script>

    // 各种数据类型
    // console.log( "hello" );
    // console.log( "123123" );
    // console.log( "true" );
    // console.log( "undefined" );
    // console.log( undefined );
    // console.log( 131322 );
    // console.log( NaN );
    // console.log( false );
    // console.log( {} );
    // console.log( [] );
    // console.log( function(){} );
    // console.log( null );

    // 数据类型的检测
    console.log( typeof "hello" );
    console.log( typeof "123" );
    console.log( typeof 123 );
    console.log( typeof NaN );
    console.log( typeof true );
    console.log( typeof {} );
    console.log( typeof [] );
    console.log( typeof function(){} );
    console.log( typeof undefined );
    console.log( typeof null );

    // 注意事项：typeof自身的执行结果以string型的数据展示
    console.log( typeof typeof null );
    console.log( typeof typeof {} );
    console.log( typeof typeof [] );
    console.log( typeof typeof function(){} );

    // ----------------

    //  如何区分数组，对象
    console.log( {} instanceof Array );
    console.log( [] instanceof Array );
    console.log( {} instanceof Object );
    console.log( [] instanceof Object );

    // 比较运算符，判断是否相等
    // 对象：任意两个对象都不相等
    console.log( {} === {} );
    console.log( [] === [] );

    // null和null相等
    console.log( null === null );

</script>
</html>